package main

import (
	"bytes"
	"encoding/json"
	"log"
)

func (x *Message) Print() {
	b, err := json.Marshal(x)
	if err != nil {
		log.Printf("%+v", x)
	}
	var out bytes.Buffer
	err = json.Indent(&out, b, "", "    ")
	if err != nil {
		log.Printf("%+v\n", x)
	}
	log.Println(out.String())
}
